package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.kly.user.db.dao.CustomersOldDao;
import com.kly.user.db.entity.CustomersEntity;
import com.kly.user.db.entity.CustomersOldEntity;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Repository;

/**
* User: linqu
* Date: 2024-06-13
* Time: 14:30:03.004
*/

@Repository
public class CustomersOldDaoImpl extends AbstractBaseMapper<CustomersOldEntity> implements CustomersOldDao {


    @Override
    public CustomersOldEntity backUpCustomer(CustomersEntity customer) {
        if (customer == null) {
            return null;
        }
        CustomersOldEntity entity = new CustomersOldEntity();
        BeanUtils.copyProperties(customer, entity);
        return super.insert(entity);
    }
}